<table width="98%" height="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="table-box bg-trans" valign="top">
    
<div class="margin padding">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" class="font-size-16 bold">Subject</td>
    <td align="right"><span class="margin-right-10"><a href="javascript: addsub('<?php echo $this->uri->segment(3,0);?>')" class="uiButtonRounded bold font-size-11">add</a></span></td>
  </tr>
</table>
<hr size="1" color="#999999" width="98%" align="left" /><br /> 
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tbody id="addshowsubject"></tbody>
<?php
$temp = 0;
foreach ($subject->result() as $res):
	$q = $this->db->query("select username from member where id_member='$res->author' limit 1");
	foreach ($q->result() as $re):
			$res->author = $re->username;
	endforeach;
?>
  <tr>
    <td align="left" class="font-size-16 capitalize">
    <a href="<?php echo base_url()?>dash/quiz/<?php echo $this->uri->segment(3,0)?>/<?php echo $res->name?>/open"><div>
    <?php echo $res->name?>
    <div class="font-size-10 font-color-gray untransform italic">type : <?php echo $res->format ?></div>
    <div class="font-size-10 font-color-gray untransform italic">posted by <?php echo $res->author ?></div>
    </div></a>
    </td>
    <td class="font-size-16 bold padding-right-20" width="15%" align="right"><span class="margin-right-20 italic">edit</span> x</td>
  </tr>
  <tr>
   <td colspan="2"><hr size="1" width="98%" color="#cccccc" align="left" /></td>
  </tr>
<?php endforeach;?>
</table>
</div>

	</td>
  </tr>
</table>